<template>
  <div id="login-app" class="login-app">
    <router-view />
  </div>
</template>

<script lang="ts" setup>
import { onMounted } from 'vue';

import { useLoginStore } from './store/login';

const loginStore = useLoginStore();

// 应用启动时恢复登录状态
onMounted(() => {
  loginStore.restoreState();
});
</script>

<style lang="less" scoped>
.login-app {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  font-family: var(--el-font-family);
}

// 确保样式不会影响主应用
#login-app {
  width: 100%;
  height: 100%;

  * {
    box-sizing: border-box;
  }
}
</style>
